import dayjs from 'dayjs'
// hunru1 就是一个混入对象
export const hunru1 = {
  data() {
    return {
      xxx: 1,
      date: 1689999999999,
      str: '<h1>测试</h1>',
    }
  },
}

export const hunru2 = {
  methods: {
    handle() {
      this.xxx = this.xxx + 1
    },
  },
  watch: {
    xxx() {
      alert('混入', this.xxx)
    },
  },

  computed: {
    bigXxx() {
      return this.xxx * 10
    },
  },

  directives: {
    t(element, binding) {
      console.log('混入的指令')
      element.innerHTML = binding.value
    },
  },

  filters: {
    format(value) {
      return dayjs(value).format('YYYY-MM-DD')
    },
  },
  mounted() {
    console.log('组件挂载了')
  },
}
